// 清关
import { normalDayFormat } from "@/utils/formatData";
export const customsClearanceVo = (list: any) => {
  if (!list || list.length === 0) return [];
  const _list: any = [];
  list.forEach((item: any) => {
    _list.push(customsClearanceOne(item));
  });

  return _list;
};
export const customsClearanceOne = (item: any) => {
  // 预计到港时间
  item.estimatedArrivaltimeVo = "";
  if (item.containerEstimatedArrivalTime && item.containerEstimatedArrivalTime !== "") {
    item.estimatedArrivaltimeVo = normalDayFormat(
      item.containerEstimatedArrivalTime
    );
  }
  item.statusFlag = "";
  if(item.status===0){
    item.statusFlag = "unuploaded";
  }
  if(item.status===1){
    item.statusFlag = "uploaded";
  }
  if(item.status===2){
    item.statusFlag = "applying";
  }
  if(item.status===3){
    item.statusFlag = "complete";
  }


  


  return item;
};
